<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Smart Wheel Chart Display</title>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://elycharts.com/sites/elycharts.com/repo/lib/raphael.js"></script>

    <script type="text/javascript" src="http://elycharts.com/sites/elycharts.com/repo/dist/elycharts.min.js"></script>
    <script type="text/javascript" src="/smart-wheel/js/chart-theme.js">

    </script>

    <style type="text/css">
        .charlab {
            font-face: helvetica, arial;
            color: black;
            margin: 0;
        }

        .date {
            font-size: 10px;
            font-weight: normal
        }

        .label {
            font-size: 12px;
            line-height: 14px;
            margin-left: 2px;
            font-weight: bold
        }

        .chart-title {
            font-face: helvetica, arial;
            color: black;
            margin: 0;
            font-size: 23px;
        }
    </style>
    <script src="/smart-wheel/js/chart-utils.js"></script>
    <script>
        $(function () {
            var currentTs = currentTimestamp();
            console.log(currentTs);
            getData(10, 'speed', currentTs - 4320000, currentTs, function (data) {

                var thevalues = data.values;
                var thelabels = data.labels;
                var theanchors = data.anchors;

                console.log(thevalues);
                console.log(thelabels);
                console.log(theanchors);
                $("#chart").chart({
                    template: "dark_gray",
                    values: {
                        serie1: data.values
                    },
                    labels: data.labels,
                    anchors: data.anchors,
                    tooltips: data.tooltips
                });
            });
        });

    </script>
</head>
<body>
<span class="chart-title">Speed chart</span>

<div id="chart" style="width:632px;height:280px;"></div>
</body>
</html>
